home *** CD-ROM | disk | FTP | other *** search
/ Treccani Italiana Di Scienze Lettere Ed Arti / [Enciclopedia] Treccani Italiana di scienze lettere ed arti.iso / pc / data / xxi_appendice_dvd.swf / scripts / __Packages / mx / remoting / NetServiceProxyResponder.as < prev    next >
Text File  |  2007-11-08  |  2KB  |  56 lines

  1. class mx.remoting.NetServiceProxyResponder extends Object
  2. {
  3.    function NetServiceProxyResponder(serv, method)
  4.    {
  5.       super();
  6.       this.service = serv;
  7.       this.methodName = method;
  8.    }
  9.    function onResult(result)
  10.    {
  11.       var _loc2_ = this.service.client;
  12.       if(result instanceof mx.remoting.NetServiceProxy || result instanceof mx.remoting.RecordSet)
  13.       {
  14.          result._setParentService(this.service);
  15.       }
  16.       var _loc4_ = this.methodName + "_Result";
  17.       if(typeof _loc2_[_loc4_] == "function")
  18.       {
  19.          _loc2_[_loc4_].apply(_loc2_,[result]);
  20.       }
  21.       else if(typeof _loc2_.onResult == "function")
  22.       {
  23.          _loc2_.onResult(result);
  24.       }
  25.       else
  26.       {
  27.          mx.remoting.NetServices.trace("NetServices","info",1,_loc4_ + " was received from server: " + result);
  28.       }
  29.    }
  30.    function onStatus(result)
  31.    {
  32.       var _loc4_ = this.service.client;
  33.       var _loc6_ = this.methodName + "_Status";
  34.       if(typeof _loc4_[_loc6_] == "function")
  35.       {
  36.          _loc4_[_loc6_].apply(_loc4_,[result]);
  37.       }
  38.       else if(typeof _loc4_.onStatus == "function")
  39.       {
  40.          _loc4_.onStatus(result);
  41.       }
  42.       else if(typeof _root.onStatus == "function")
  43.       {
  44.          _root.onStatus(result);
  45.       }
  46.       else if(typeof _global.System.onStatus == "function")
  47.       {
  48.          _global.System.onStatus(result);
  49.       }
  50.       else
  51.       {
  52.          mx.remoting.NetServices.trace("NetServices","info",2,_loc6_ + " was received from server: <" + result.level + "> " + result.description);
  53.       }
  54.    }
  55. }
  56.